package com.camartsApp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @version .......
 * @创建时间 2025/6/12  下午3:04
 * @创建者 玉苏甫江
 */
/**
 * 用户实体类，映射数据库user表
 */
@Data
@TableName("user")
public class User implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.AUTO)
	private Long id;

	private String password;

	private String avatar;

	private Byte status;

	private String phone;

	@TableField("register_time")
	private LocalDate registerTime;

	@TableField("ban_time")
	private LocalDate banTime;

	@TableField("followers_count")
	private Long followersCount;

	@TableField("following_count")
	private Long followingCount;

	@TableField("is_hidden")
	private Byte isHidden;

	private String nickname;

	private String email;

	private String signature;

	@TableField("likes_count")
	private Long likesCount = 0L;  // 默认值0

	@TableField("hide_following")
	private Boolean hideFollowing = true;  // 默认公开

	@TableField("hide_followers")
	private Boolean hideFollowers = true;  // 默认公开

	@TableField("hide_works")
	private Boolean hideWorks = true;  // 默认公开

	@TableField("hide_likes")
	private Boolean hideLikes = true;  // 默认公开
}